﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace SST.Phone.Model.DAO
{
    /// <summary>
    /// Base class of all DAO
    /// </summary>
    public class BaseDAO
    {
        protected MainDataContext _db;

        /// <summary>
        /// The database
        /// </summary>
        public MainDataContext DB
        {
            get { return _db; }
            set { _db = value; }
        }

        public BaseDAO(MainDataContext db)
        {
            this._db = db;
        }

        protected void Debug(string message)
        {
            System.Diagnostics.Debug.WriteLine(message);
        }

        protected void Error(Exception ex)
        {
            System.Diagnostics.Debug.WriteLine(ex.Message + "\r\n" + ex.StackTrace);
        }
    }
}
